import Mock from 'mockjs'
const count = 100

let memberTableList = [] // B2C商品列表
let templateClassificationList = []
let attributeValueClassificationList = [] // 属性值分类数据
let attributeValueManageList = [] // 属性值管理
let templateList = [] // 模板
let attributeList = [] // 属性
let brandList = [] // 品牌
let goodsEvaluationList = [] // 商品评价
let templateCheck = [] // 属性
let b2cDetails = {
    productName: '洋柿子就是西红柿',
    productType: '电子产品',
    productNo: 12121,
    price: 4990,
    shelfState: '已上架',
    searchKey: '值得买、早下手',
    recommend: '这件商品是真的好',
    brand: '夕阳红',
    specsData: [
        {
            specsName: '黑色',
            uuid: 'SKU00004',
            isDefault: true,
            stock: 6,
            marketPrice: 4999.0,
            price: 4999.0
        },
        {
            specsName: '紫色',
            uuid: 'SKU00004',
            stock: 6,
            marketPrice: 4999.01,
            price: 4999.02
        },
        {
            specsName: '绿色',
            uuid: 'SKU00004',
            stock: 6,
            marketPrice: 4999.01,
            price: 4999.02
        }
    ],
    shopTimeData: [
        {
            attrName: '一号技师',
            uuid: 'SKU00004',
            stock: 6,
            time: '10:00-16:00'
        },
        {
            attrName: 'er号技师',
            uuid: 'SKU00004',
            stock: 6,
            time: '10:00-16:00'
        },
        {
            attrName: 'san号技师',
            uuid: 'SKU00004',
            stock: 6,
            time: '10:00-16:00'
        }
    ],
    productImages: [
        {
            url:
                'https://dev-file.iviewui.com/userinforaP8NeQgYpmKgkpWlqZP7rfewbHiIzJY/avatar',
            name: '', // 图片/视频名称
            type: 'img', // 类型: img-图片（默认） video：视频
            corner: '主图' // 是否有角标
        },
        {
            url:
                'https://dev-file.iviewui.com/BbnuuEiM0QXNPHVCvb3E2AFrawIjCkqW/avatar',
            name: '', // 图片/视频名称
            type: '', // 类型: img-图片（默认） video：视频
            corner: '' // 是否有角标
        }
    ],
    productVideos: [
        {
            url: 'https://www.w3school.com.cn/i/movie.ogg',
            name: '', // 图片/视频名称
            type: 'video', // 类型: img-图片（默认） video：视频
            vType: '', // 视频类型
            corner: '' // 是否有角标
        },
        {
            url:
                'https://image.mux.com/UZMwOY6MgmhFNXLbSFXAuPKlRPss5XNA/thumbnail.jpg?time=11',
            name: '', // 图片/视频名称
            type: '', // 类型: img-图片（默认） video：视频
            corner: '封面' // 是否有角标
        }
    ],
    productDesc:
        '<p>这里上商品信息，这里上商品信息，这里上商品信息，这里上商品信息，这里上商品信息，这里上商品信息，这里上商品信息，这里上商品信息，这里上商品信息，</p><img src="https://dev-file.iviewui.com/userinforaP8NeQgYpmKgkpWlqZP7rfewbHiIzJY/avatar" />'
}
for (let i = 0; i < count; i++) {
    memberTableList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            memberId: 'm0000001',
            kehu: '@cname',
            address: '@province @city @county',
            'productName|1': ['土豆子就是马铃薯', '洋柿子就是西红柿', '芋头也叫红薯'],
            'productType|1': ['电子产品', '纸质产品', '衣服'],
            'productNo|+1': 12121,
            'price|1': [4990, 234, 1234, 3345, 564],
            'stock|1': [490, 2324, 14, 45, 4],
            'sale|1': [42, 2324, 14, 4335, 4],
            marketPrice: 9999,
            'shelfState|1': ['已上架', '已下架'],
            'auditState|1': ['审核通过', '未审核', '已拒绝'],
            'searchKey|1': ['好货、珍品', '值得买、早下手', '真牛皮、做真皮'],
            recommend: [
                '这件商品是真的好',
                '好的商品人人想要',
                '买了不吃亏，买了真实惠'
            ],
            'brand|1': ['夕阳红', '朝阳红', '正午热'],
            buyNum: 345,
            xfMoney: 1383,
            releaseTime: '@date(yyyy-MM-dd)', // data选择范围是 是数组形式 如：['2019-12-13,2019-12-13]
            'brandLogo|1': [
                // 默认列表 同iview组件的 defaultList
                [
                    {
                        name: '小头1', // 图片name
                        url:
                            'https://dev-file.iviewui.com/BbnuuEiM0QXNPHVCvb3E2AFrawIjCkqW/avatar' // 图片url
                    }
                ],
                [
                    {
                        name: '小头像', // 图片name
                        url:
                            'https://dev-file.iviewui.com/userinforaP8NeQgYpmKgkpWlqZP7rfewbHiIzJY/avatar' // 图片url
                    }
                ]
            ],
            'actions|1': [
                [
                    {
                        name: 'Audit',
                        label: '审核',
                        handleType: 'confirm'
                    },
                    {
                        name: 'LowerShelf',
                        label: '下架',
                        handleType: 'alert'
                    }
                ],
                [
                    {
                        name: 'View',
                        label: '查看',
                        handleType: 'link'
                    },
                    {
                        name: 'Audit',
                        label: '审核',
                        handleType: 'confirm'
                    },
                    {
                        name: 'LowerShelf',
                        label: '下架',
                        handleType: 'alert'
                    }
                ]
            ]
        })
    )

    templateClassificationList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '测试模板' + i,
            'actions|1': [
                [
                    {
                        name: 'Edit',
                        label: '编辑',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    }
                ]
            ]
        })
    )
    attributeValueClassificationList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '名称' + i,
            enName: 'one' + i,
            'actions|1': [
                [
                    {
                        name: 'Edit',
                        label: '编辑',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    }
                ]
            ]
        })
    )
    attributeValueManageList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '名称' + i,
            type: 'one' + i,
            'imgTxt|1': [
                {
                    image:
                        'http://qqpublic.qpic.cn/qq_public/0/0-2456783750-C9C94EB68279B180800445836468D9F8/0?fmt=jpg&size=206&h=600&w=900&ppv=1',
                    name: '库克',
                    nameLink: '', // name连接地址 默认为空
                    shape: 'square', // 指定头像的形状，可选值为 circle、square
                    size: 'large', // 设置头像的大小，可选值为 large、small、default，或者支持设置具体数值，如：80
                    onlyShow: 'image' // 空字符串： 代表全部显示， image:只显示图片， text:只显示文字
                },
                {
                    image:
                        'http://qqpublic.qpic.cn/qq_public/0/0-3008497817-A4DEB81D707A4483F960AB5584C26E97/0?fmt=jpg&size=186&h=600&w=900&ppv=1',
                    name: '乔布斯',
                    nameLink: '', // name连接地址 默认为空
                    shape: 'square', // 指定头像的形状，可选值为 circle、square
                    size: 'large',
                    onlyShow: 'image' // 空字符串： 代表全部显示， image:只显示图片， text:只显示文字
                }
            ],
            'actions|1': [
                [
                    {
                        name: 'Edit',
                        label: '编辑',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    }
                ]
            ]
        })
    )
    templateList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '名称' + i,
            type: 'one' + i,
            'isUse|1': ['是', '否'],
            note: '测试模板',
            createOpeTime: '@date(yyyy-MM-dd HH:mm:ss)',
            'actions|1': [
                [
                    {
                        name: 'Edit',
                        label: '编辑',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    },
                    {
                        name: 'Check',
                        label: '查看属性',
                        handleType: 'link'
                    }
                ]
            ]
        })
    )
    templateCheck.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '名称' + i,
            mouldName: 'one' + i,
            'isUse|1': ['0', '1'],
            type: [
                {
                    value: '文本框',
                    label: '文本框'
                },
                {
                    value: '单选框',
                    label: '单选框'
                },
                {
                    value: '复选框',
                    label: '复选框'
                }
            ],
            'defType|1': ['文本框', '复选框', '单选框'],
            createOpeTime: '@date(yyyy-MM-dd HH:mm:ss)',
            'actions|1': [
                [
                    {
                        name: 'renew',
                        label: '更新',
                        handleType: 'alert'
                    },
                    {
                        name: 'disassociation',
                        label: '取消关联',
                        handleType: 'alert'
                    }
                ]
            ]
        })
    )
    attributeList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '名称' + i,
            enName: 'one' + i,
            'actions|1': [
                [
                    {
                        name: 'Edit',
                        label: '编辑',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    },
                    {
                        name: 'View',
                        label: '查看属性',
                        handleType: 'link'
                    }
                ]
            ]
        })
    )
    brandList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            brandName: '品牌' + i,
            'imgTxt|1': [
                {
                    image:
                        'http://qqpublic.qpic.cn/qq_public/0/0-2456783750-C9C94EB68279B180800445836468D9F8/0?fmt=jpg&size=206&h=600&w=900&ppv=1',
                    name: '库克',
                    nameLink: '', // name连接地址 默认为空
                    shape: 'square', // 指定头像的形状，可选值为 circle、square
                    size: 'large', // 设置头像的大小，可选值为 large、small、default，或者支持设置具体数值，如：80
                    onlyShow: 'image' // 空字符串： 代表全部显示， image:只显示图片， text:只显示文字
                },
                {
                    image:
                        'http://qqpublic.qpic.cn/qq_public/0/0-3008497817-A4DEB81D707A4483F960AB5584C26E97/0?fmt=jpg&size=186&h=600&w=900&ppv=1',
                    name: '乔布斯',
                    nameLink: '', // name连接地址 默认为空
                    shape: 'square', // 指定头像的形状，可选值为 circle、square
                    size: 'large',
                    onlyShow: 'image' // 空字符串： 代表全部显示， image:只显示图片， text:只显示文字
                }
            ],
            'actions|1': [
                [
                    {
                        name: 'Edit',
                        label: '编辑',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    }
                ]
            ]
        })
    )
    goodsEvaluationList.push(
        Mock.mock({
            uuid: '@increment()', // 必须项
            name: '品牌' + i,
            goodsNo: '@increment(6)',
            brand: '品牌' + i,
            type: '类型' + i,
            orderNo: '@increment(6)',
            storeName: '商家' + i,
            people: '@cname',
            'note|1-5': '★',
            createOpeTime: '@date(yyyy-MM-dd HH:mm:ss)',
            'actions|1': [
                [
                    {
                        name: 'Show',
                        label: '查看',
                        handleType: 'link'
                    },
                    {
                        name: 'Delete',
                        label: '删除'
                    }
                ]
            ]
        })
    )
}

export default [
    {
        path: '/api/getB2cGoodsList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...memberTableList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getB2cDetails',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: b2cDetails,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/delMemberInfo',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                return {
                    code: 0,
                    msg: '删除数据成功',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/toB2cAudit',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                return {
                    code: 0,
                    msg: '审核成功',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/toB2cLowerShelf',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                return {
                    code: 0,
                    msg: '审核成功',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getTemplateClassificationList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...templateClassificationList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getTemplateClassification',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                let memberInfo = {}
                for (let i = 0; i < templateClassificationList.length; i++) {
                    if (Number(body.uuid) === templateClassificationList[i].uuid) {
                        memberInfo = templateClassificationList[i]
                        break
                    }
                }
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: memberInfo,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addTemplateClassification',
        method: 'get',
        handle ({ body }) {
            if (body.userName) {
                templateClassificationList.unshift(body.formData)
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getAttributeValueClassificationList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...attributeValueClassificationList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getAttributeValueClassification',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                let memberInfo = {}
                for (let i = 0; i < attributeValueClassificationList.length; i++) {
                    if (Number(body.uuid) === attributeValueClassificationList[i].uuid) {
                        memberInfo = attributeValueClassificationList[i]
                        break
                    }
                }
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: memberInfo,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addAttributeValueClassification',
        method: 'get',
        handle ({ body }) {
            if (body.userName) {
                attributeValueClassificationList.unshift(body.formData)
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getAttributeValueManageList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...attributeValueManageList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getAttributeValueManage',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                let memberInfo = {}
                for (let i = 0; i < attributeValueManageList.length; i++) {
                    if (Number(body.uuid) === attributeValueManageList[i].uuid) {
                        memberInfo = attributeValueManageList[i]
                        break
                    }
                }
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: memberInfo,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addAttributeValueManage',
        method: 'get',
        handle ({ body }) {
            if (body.userName) {
                attributeValueManageList.unshift(body.formData)
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getTemplateList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...templateList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getTemplateCheck',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...templateCheck].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getTemplate',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                let memberInfo = {}
                for (let i = 0; i < templateList.length; i++) {
                    if (Number(body.uuid) === templateList[i].uuid) {
                        memberInfo = templateList[i]
                        break
                    }
                }
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: memberInfo,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addTemplate',
        method: 'get',
        handle ({ body }) {
            if (body.userName) {
                templateList.unshift(body.formData)
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getAttributeList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...attributeList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getAttribute',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                let memberInfo = {}
                for (let i = 0; i < attributeList.length; i++) {
                    if (Number(body.uuid) === attributeList[i].uuid) {
                        memberInfo = attributeList[i]
                        break
                    }
                }
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: memberInfo,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addAttribute',
        method: 'get',
        handle ({ body }) {
            if (body.userName) {
                attributeList.unshift(body.formData);
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getBrandList',
        method: 'get',
        handle ({ body }) {
            const start = body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow;
            const end = start + body.pageInfo.pageShow;
            let data = {
                return_code: 0,
                list: [...brandList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getBrandByUuid',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                let memberInfo = {}
                for (let i = 0; i < brandList.length; i++) {
                    if (Number(body.uuid) === brandList[i].uuid) {
                        memberInfo = brandList[i]
                        break
                    }
                }
                return {
                    code: 0,
                    msg: '',
                    data: {
                        data: memberInfo,
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addBrandList',
        method: 'get',
        handle ({ body }) {
            if (body.userName) {
                brandList.unshift(body.formData)
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getGoodsEvaluationList',
        method: 'get',
        handle ({ body }) {
            const start =
                body.pageInfo.nowPage * body.pageInfo.pageShow - body.pageInfo.pageShow
            const end = start + body.pageInfo.pageShow
            let data = {
                return_code: 0,
                list: [...goodsEvaluationList].slice(start, end),
                pageInfo: {
                    nowPage: 1, // 当前页数
                    pageShow: body.pageInfo.pageShow, // 每页显示条数
                    totalPage: count / body.pageInfo.pageShow, // 总页数
                    totalNum: count // 总条数
                }
            }
            if (body.pageInfo.nowPage) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/getClassify',
        method: 'get',
        handle ({ body }) {
            let categoryList = [
                [
                    {
                        name: '女装',
                        uuid: '231234asdad'
                    },
                    {
                        name: '办公家具',
                        uuid: '231234asdad'
                    },
                    {
                        name: '儿童家具',
                        uuid: '231234asdad'
                    },
                    {
                        name: '百货家具',
                        uuid: '231234asdad'
                    },
                    {
                        name: '羽绒服棉服',
                        uuid: 'ewe2we23r'
                    },
                    {
                        name: '男装女装',
                        uuid: 'ewe2we23r'
                    },
                    {
                        name: '数码相机',
                        uuid: 'ewe2we23r'
                    },
                    {
                        name: '手机电视',
                        uuid: 'ewe2we23r'
                    }
                ],
                [
                    {
                        name: '夏季女装',
                        uuid: '231234asdad'
                    },
                    {
                        name: '冬季女装',
                        uuid: '231234asdad'
                    }
                ],
                [
                    {
                        name: '上衣',
                        uuid: '231234asdad'
                    },
                    {
                        name: '外套',
                        uuid: '231234asdad'
                    }
                ],
                [
                    {
                        name: '短袖',
                        uuid: '231234asdad'
                    },
                    {
                        name: '长袖',
                        uuid: '231234asdad'
                    }
                ]
            ]
            let _index = Number(body.level)

            let data = {
                return_code: 0,
                list: categoryList[_index]
            }
            if (body.level) {
                return {
                    code: 0,
                    msg: '获取数据成功',
                    data: data
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/addClassify',
        method: 'get',
        handle ({ body }) {
            if (body.classifyName) {
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/editClassifyInfo',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/deleteByUuids',
        method: 'get',
        handle ({ body }) {
            if (body.uuids) {
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    },
    {
        path: '/api/toRelationBrand',
        method: 'get',
        handle ({ body }) {
            if (body.uuid) {
                return {
                    code: 0,
                    msg: '',
                    data: {
                        return_code: 0
                    }
                }
            } else {
                return {
                    code: 401,
                    msg: '接口请求超时',
                    data: {}
                }
            }
        }
    }
]
